import { configureStore } from '@reduxjs/toolkit'
import { settingsReducer } from './settingsSlice'
import { wordReducer } from './wordSlice'
import { actionReducer } from './actionSlice'

export const store = configureStore({
	reducer: {
		settings: settingsReducer,
		word: wordReducer,
		action: actionReducer
	}
})

// 类型定义：通过 ReturnType<typeof store.getState> 自动推导完整的 store 类型
export type RootState = ReturnType<typeof store.getState>
